#ifndef __HI_DRAW_H__
#define __HI_DRAW_H__

#include "hi_type.h"
#include "HiVideoVproc.h"

class HiDraw
{
public:
    struct DrawContent
    {
    public:
        DrawContent(){}
        DrawContent(HI_S32 minX, HI_S32 minY, HI_S32 maxX, HI_S32 maxY,
            HI_U32 color, HI_HANDLE handle, std::string text)
            : m_minX(minX), m_minY(minY), m_maxX(maxX), m_maxY(maxY), m_color(color), m_text(text){}
        HI_S32 m_minX;
        HI_S32 m_minY;
        HI_S32 m_maxX;
        HI_S32 m_maxY;
        HI_U32 m_color;
        std::string m_text;
        HI_HANDLE m_modHdl;
        HI_HANDLE m_chnHdl;
    };

    HiDraw();
    virtual ~HiDraw();
    HI_S32 DrawBox(HiImage& image, DrawContent boxContent[], HI_U32 boxCnt);
    HI_S32 DrawText(HiImage& image, DrawContent boxContent[], HI_U32 osdCnt);
    HI_S32 Init();
    HI_S32 DeInit();
private:
    typedef struct {
        HI_U64 phyAddr;
        HI_VOID *virtAddr;
        HI_U32 bufLen;
    } VGS_Buffer;
    VGS_Buffer m_vgsCoverBuffer;
    VGS_Buffer m_vgsOsdBuffer;
};

#endif //__HI_DRAW_H__
